home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / applications / wp / macro28.lha / Macro / FinsGold / Modula / run.ged < prev   
Encoding:
Text File  |  1994-06-12  |  1.4 KB  |  51 lines

  1. /* run.ged $VER: 0.1 run.ged © 1994 Fin Schuppenhauer (12.06.94) */
  2.  
  3. OPTIONS RESULTS                             /* enable return codes     */
  4.  
  5. if (LEFT(ADDRESS(), 6) ~= "GOLDED") then    /* not started by GoldEd ? */
  6.     address 'GOLDED.1'
  7.  
  8. 'LOCK CURRENT'                              /* lock GUI, gain access   */
  9. OPTIONS FAILAT 6                            /* ignore warnings         */
  10. SIGNAL ON SYNTAX                            /* ensure clean exit       */
  11.  
  12.  
  13. /* ------------------------ INSERT YOUR CODE HERE: ------------------- */
  14.  
  15. 'QUERY CAT'
  16. german = (result = "deutsch")
  17.  
  18. 'QUERY FILE VAR FILENAME'
  19. if (right(filename, 4) ~= '.def') & (right(filename, 4) ~= '.mod') then do
  20.    if german then
  21.       'REQUEST BODY="Dies ist kein Modula-2-Quelltext!|Weitermachen?" BUTTON=Ja|Nein'
  22.    else
  23.       'REQUEST BODY="This is no modula-2 source!|Still continue?" BUTTON=Yes|No'
  24.    if result = '0' then do
  25.       'UNLOCK'
  26.       EXIT
  27.    end
  28. end
  29.  
  30. filename = left(filename, length(filename)-4)
  31.  
  32. if german then
  33.    'REQUEST BODY="Starten des Programms:" STRING OLD="'filename'" VAR PROGRAM'
  34. else
  35.    'REQUEST BODY="Starting programm:" STRING OLD="'filename'" VAR PROGRAM'
  36. if rc = 0 then do
  37.    ADDRESS COMMAND program
  38. end
  39.  
  40.  
  41. /* ---------------------------- END OF YOUR CODE --------------------- */
  42.  
  43. 'UNLOCK' /* VERY important: unlock GUI */
  44. EXIT
  45.  
  46. SYNTAX:
  47.  
  48. SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
  49. 'UNLOCK'
  50. EXIT
  51.